"""
(c) 2011 paketka@gmail.com

comes from http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
by Graham Dumpleton
"""
import os
import sys

path = '/srv/'
if path not in sys.path:
	sys.path.insert(0, path)

path = '/srv/parliament-poll-stats/'
if path not in sys.path:
	sys.path.insert(0, path)

path = '/usr/lib/pymodules/python2.6/'
if path not in sys.path:
	sys.path.insert(0, path)


import settings

import django.core.management
django.core.management.setup_environ(settings)
utlity = django.core.management.ManagementUtility()
command = utlity.fetch_command('runserver')
command.validate()

import django.conf
import django.utils
django.utils.translation.activate(django.conf.settings.LANGUAGE_CODE)


import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
